﻿#ifndef WINMANAGER_H
#define WINMANAGER_H

#include <QObject>
#include "CallOnce.h"
#include "Singleton.h"
class FormAddGroup;
class Widget;
class FormViewRecord;
class FormRecordControl;

class WinManager : public QObject
{
    Q_OBJECT
public:
    explicit WinManager(QObject *parent = 0);
    ~ WinManager();
    void test();

    void showMain();
    void showAddGroup();
    void showViewRecord();
    void showRecordControl();

    Widget *getMain();
    FormAddGroup *getAddGroup();
    FormViewRecord *getViewRecord();
    FormRecordControl *getRecordControl();
signals:

    void sig_changIP();
private:
    Widget *m_mainWidget;
    FormAddGroup *m_formgaddgroup;
    FormViewRecord *m_formviewrecord;
    FormRecordControl *m_formrecordcontrol;

    void showInMainWidget(QWidget *widget);
public slots:

};

#define WinMgr Singleton<WinManager>::instance()

#endif // WINMANAGER_H
